const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
  transpileDependencies: true,
  // 配置proxy代理服务，用于跨域请求
  devServer: {
    proxy: {
      '/': {
        target: 'http://server.lyanlul.cn/api',
        changeOrigin: true,
        ws: false,
      },
    },
  },
  // 开启 top-level-await 功能，用于实现动态路由的加载
  configureWebpack: {
    experiments: {
      topLevelAwait: true,
    },
  },
});
